<?php
/**
 * Created by PhpStorm.
 * Author: sitewang@aliyun.com
 * CreateTime: 2022/3/21 12:21 PM
 * Blog：www.myblogs.xyz
 */
$daystr = '2020-12-31';
$cur_time = strtotime($daystr . ' 24:00:00');
$yms = date('Y-01-01', $cur_time);
$yme = date('Y-12-t 24:00:00', $cur_time);
$day = ((strtotime($yme) - strtotime($yms))/(3600*24))-(($cur_time - strtotime($yms))/(3600*24));
//$day = ((strtotime($yme) - strtotime($yms))/(3600*24));
var_dump($day);
var_dump(date('Ymdhis', time()));
var_dump(date('YMDHIS', time()));